import request from '@/utils/request'
// 分段接口
export function segmentate(data) {
  return request({
    url: '/popularize/consultingController/segmentate',
    method: 'post',
    data: data
  })
}

//同步数据
export function getInformationList(data) {
  return request({
    url: '/popularize/consultingController/getConsultingList',
    method: 'get',
    params: data
  })
}

// 获取资讯详情
export function getInformationDetial(data) {
  return request({
    url: '/popularize/consultingController/getConsultingById',
    method: 'get',
    params: data
  })
}

// 根据id获取预览资讯信息
export function getPreviewInfoWithId(data) {
  return request({
    url: '/popularize/consultingController/preview',
    method: 'get',
    params: data
  })
}

// 根据id显示隐藏资讯列表
export function updateConsultingStatus(data) {
  return request({
    url: '/popularize/consultingController/updateConsultingStatus',
    method: 'get',
    params: data
  })
}

// 编辑资讯时获取预览信息
export function getPreviewInfoWhileEditing(data) {
  return request({
    url: '/popularize/consultingController/previewBeforeSave',
    method: 'post',
    data: data
  })
}

// 删除资讯
export function deleteInformation(data) {
  return request({
    url: '/popularize/consultingController/deleteConsulting',
    method: 'post',
    data: data
  })
}

// 保存资讯信息
export function saveInformation(data) {
  return request({
    url: '/popularize/consultingController/saveConsulting',
    method: 'post',
    data: data
  })
}

// 保存资讯信息
export function updateInformation(data) {
  return request({
    url: '/popularize/consultingController/updateConsulting',
    method: 'post',
    data: data
  })
}